import request from '@/utils/request'

export function login (data) {
    return request({
        url: '/v1_0/authorizations',
        method: 'POST',
        data
    })
}

//获取用户信息
export function getUserInfo () {
    return request({
        url: '/v1_0/user/profile',
    })
}

//编辑用户资料
export function editUserInfo(data) {
    return request({
        url: '/v1_0/user/profile',
        method: 'PATCH',
        data
    })
}

//编辑用户照片资料
export function uploadImg(data) {
    return request({
        url: '/v1_0/user/photo',
        method: 'PATCH',
        data
    })
}
// export const login = (data) => {
//     return request({
//         url: '/v1_0/authorizations',
//         method: 'POST',
//         data
//     })
// }
